import { http } from "@/utlis/http";

/**
 * 用户微信修改信息
 * @param data 请求体参数
 */
export const putUserUpdateAPI = (data: any) => {
  return http({
    method: "PUT",
    url: "/user/update",
    data,
  });
};

/**
 * 用户登录信息
 * @param data 请求体参数
 */
export const postUserLoginAPI = (data: any) => {
  return http({
    method: "POST",
    url: "/user/login",
    data,
  });
};

/**
 *
 * @param data
 * @returns
 */
export function loginWithPhoneAPI(data: any) {
  return http({
    url: "/user/phoneLogin",
    method: "POST",
    data,
  });
}
/**
 *
 * @param data
 * @returns
 */
export const postAPI = (data: any) => {
  return http({
    method: "POST",
    url: "/visit/record",
    data,
  });
};

/**
 *
 * @param params
 * @returns
 */
export const postDailyAPI = (data: any) => {
  return http({
    method: "POST",
    url: "/visit/recordDaily",
    data,
  });
};
